package com.snow.useviewdemo.function.eventtouch

import android.content.Context
import android.util.AttributeSet
import android.util.Log
import android.view.MotionEvent
import androidx.appcompat.widget.AppCompatTextView

/**
 * Created by zhaoyingtao
 * Date: 2021/9/9
 * Describe:
 */
class EventDeliveryTextView : AppCompatTextView {
    constructor(context: Context) : super(context)
    constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)

    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec)

    }

    override fun dispatchTouchEvent(event: MotionEvent?): Boolean {
        Log.e("eventSnow", "==EventDeliveryTextView===dispatchTouchEvent=====${event?.action}")
        return super.dispatchTouchEvent(event)
    }

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        Log.e("eventSnow", "==EventDeliveryTextView===onTouchEvent=====${event?.action}")
        return super.onTouchEvent(event)
    }
}